const { nanoid } = require('nanoid'),
    Qiniu = require('qiniu');
function qiniuUpload(options) {
    const mac = new Qiniu.auth.digest.Mac(options.ak, options.sk),
        conf = new Qiniu.conf.Config(),
        client = new Qiniu.rs.BucketManager(mac, conf),
        key = nanoid() + options.ext;
    return new Promise((resolve, reject) => {
        client.fetch(options.url, options.bucket, key, (error, ret, info) => {
            if (error) {
                reject(error);
            } else {
                if (info.statusCode === 200) {
                    resolve({ key })
                } else {
                    reject(info)
                }
            }
        })
    })
}
function makeCrypto(str){
    const _md5 = crypto
}
module.exports = {

}     